package cn.school.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;

/**
 * 未提交记录表
 * @TableName missed_submissions
 */
@TableName(value ="missed_submissions")
@Data
public class MissedSubmissions implements Serializable {
    /**
     * 
     */
    @TableId
    private Integer id;

    /**
     * 任务ID
     */
    private Integer taskId;

    /**
     * 未提交学生ID
     */
    private Integer studentId;

    /**
     * 是否通知学生(0:否,1:是)
     */
    private Integer isNotified;

    /**
     * 通知时间
     */
    private Date notifiedTime;

    /**
     * 创建时间
     */
    private Date createdTime;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        MissedSubmissions other = (MissedSubmissions) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getTaskId() == null ? other.getTaskId() == null : this.getTaskId().equals(other.getTaskId()))
            && (this.getStudentId() == null ? other.getStudentId() == null : this.getStudentId().equals(other.getStudentId()))
            && (this.getIsNotified() == null ? other.getIsNotified() == null : this.getIsNotified().equals(other.getIsNotified()))
            && (this.getNotifiedTime() == null ? other.getNotifiedTime() == null : this.getNotifiedTime().equals(other.getNotifiedTime()))
            && (this.getCreatedTime() == null ? other.getCreatedTime() == null : this.getCreatedTime().equals(other.getCreatedTime()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getTaskId() == null) ? 0 : getTaskId().hashCode());
        result = prime * result + ((getStudentId() == null) ? 0 : getStudentId().hashCode());
        result = prime * result + ((getIsNotified() == null) ? 0 : getIsNotified().hashCode());
        result = prime * result + ((getNotifiedTime() == null) ? 0 : getNotifiedTime().hashCode());
        result = prime * result + ((getCreatedTime() == null) ? 0 : getCreatedTime().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", taskId=").append(taskId);
        sb.append(", studentId=").append(studentId);
        sb.append(", isNotified=").append(isNotified);
        sb.append(", notifiedTime=").append(notifiedTime);
        sb.append(", createdTime=").append(createdTime);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}